package com.bottle.enity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @author: chenyuncong
 * @Date: 2020/4/30 15:42
 * 单聊记录
 */
@Data
@Document(collection = "s_single_chat_record")
@CompoundIndexes({
        @CompoundIndex(name = "i_encryptionId_createTime",def = "{'encryptionId':1,'createTime':-1}")
})
public class SingleChatRecord {
    @Id
    private String id;
    private String content; //内容
    private Long sendTime; //发送时间
    private Long createTime; //服务里面的创建时间
    private String userId; //发送的用户id
    private String encryptionId; //桥梁加密id
}
